/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package rgut2;

import java.util.Date;

/**
 *
 * @author ppfaff
 */
    
    public class TheRunnable implements Runnable{
    
    public TheRunnable(){
    }
    private Integer countDown = 5;
    private static Integer num = 1;
    public void run(){
        Thread.currentThread().setName("Thread "+num);
        num++;
        try{
            for (int i = 0; i<= 5; i++){
                System.out.println(Thread.currentThread().getName()+" Count: "+countDown);
                if(countDown<=0){System.out.println("Blastoff!");}
                countDown--;
                Thread.sleep(DELAY);
                
            }}
            catch( InterruptedException exception){        
        }
    }
private String greeting;
private static final int REPETITIONS = 10;
private static final int DELAY = 1000;
 }


